import json
from urllib.parse import parse_qs, unquote_plus
def str2json(query_string):
    # 解析查询字符串
    params = parse_qs(query_string)
    # 构建字典，注意unquote_plus用于解码可能的URL编码
    parsed_params = {k: unquote_plus(v[0]) for k, v in params.items()}
    # 转换为JSON字符串
    json_string = json.dumps(parsed_params, ensure_ascii=False)
    return json_string